
#!/bin/bash

MODULE='mydrv'

MODULE_STATUS=`lsmod | grep ${MODULE}`
[ "${MODULE_STATUS}" != "" ] && sudo rmmod ${MODULE}


sudo dmesg -c > /dev/null

sudo insmod ${MODULE}.ko
sudo rmmod ${MODULE}

sudo dmesg | tail
